#ifndef	_TSE_H_
#define	_TSE_H_

#include "uutil.h"
#include "tpool.h"
#include "hhash.h"
#include "cpool.h"

int is_alnum( char str[] );
void xstrcpy( unsigned char[], unsigned char *, int );
void fnFixBackSlash( unsigned char s1[], unsigned char s2[] );
void fnDecodeStep1( unsigned char[]);
void fnDecodeStep2( unsigned char[],int );
void fnProcessDecode( int fd );
char *fnProcessMod(unsigned char );
void INIT_tick(int );
void INIT_Pause(int );
void IN_tick(int ,unsigned  char );
int CP_szString(int , unsigned char[] , int, int, int);
char *fncreateStep( unsigned char szString[] );

enum fnDecodeStep2Len
{

	StocknoLen=6,  	//stock Len
	StocknameLen=6, //stock name Len
	istocknoLen=4,  //istockno Len
	stockcatLen=2,	//stock cat Len
	iswarningLen=2,	//iswarning Len
	priceLen=6,	//price Len
	warrant_noLen=1, //warrant_no Len
	contract_priceLen=6, //contract_price len 
	contractLen=10,	//contract Len
	useLen=6,	//use Len
	
	
}fnLen;

enum fnDecodeStep2adr
{
	
	f1Decode1=10, 	//stock adr   
	f1Decode2=26,	//istockno adr  
	f1Decode3=16,	//stock name adr   
	f1Decode4=22,	//stock cat adr
	f1Decode5=28,	//iswarning adr
	f1Decode6=29,	//price adr
	f1Decode7=38,	//warrant_no adr
	f1Decode8=39,	//contract_price adr
	f1Decode9=42,	//contract adr
	f1Decode10=57,	//use adr
}fnadr;

enum fnDecodeStep2Size
{
	inSize, 	//init value
	szSize=255,  	//init;
	MaxszSize=1024, //Max len
	tmpSize=12, 	//tmp len
	
}fnSize;


int nums; //stock nums
int once[2000]; // f5 add
char gszdate[20];
char gdldate[20];

#endif  /*  */
